package com.dms.wuziqi.service.serviceImpl;

import com.dms.wuziqi.Result.Result;
import com.dms.wuziqi.mapper.UserMapper;
import com.dms.wuziqi.pojo.User;
import com.dms.wuziqi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public User findUserById(int userId) {

        User u=userMapper.findUserById(userId);
        return u;
    }

    @Override
    public User findUserByNameAndPwd(String name, String password) {
        User user=userMapper.findUserByNameAndPwd(name,password);
        return user;
    }

    @Override
    public void insertUser(String userName, String userPwd) {
        userMapper.insertUser(userName,userPwd);
    }
}
